﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using LFloatMath.Math;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Target + "/" + SkillEditorConst.Circle, typeof(SkillEditorGraph))]
    public class SkillTargetSelectNode_Circle : SkillTargetSelectNode
    {
        //[Input("半径"), ShowAsDrawer] 
        [InspectorName("半径")] public float raduis;
        [InspectorName("圆心移动半径")] public float centerRange;
        protected override ETargetSelectType targetType => ETargetSelectType.Circle;
        protected override bool checkRelation => true;
        
        protected override SkillCustomConfig CreateConfig()
        {
            return new TargetSelect_Circle_ConfigData()
            {
                raduis = ((LFloat)this.raduis)._val,
                centerRange = ((LFloat)this.centerRange)._val
            };
        }
    }
}